\section{Implementation}
\label{impl}
We implement ATCP in NS2 to estimate parameters and evaluate the trace from data center and other benchmarks. In NS2's socket data structure, we add the parameter $W_H$, $W_L$ and $T$ as members, and we also add the counter to the socket to record sent-data size which is set to be 0 initially. When the socket sends data, the size of sent data is added to the counter. In congestion avoidance state, when the congestion window CWND is increased by some value $adder$, we increase it by $adder\times weight()$, where $weight()$ is computed by the parameters and counter. We add APIs to set the parameters in the socket data structure.

The changed code is less than 100 lines, but it improves TCP's performance significantly.

